Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow managing data retention policies #817

Merged

Conversation

mwudka
Copy link
Contributor

@mwudka mwudka commented Nov 14, 2023

Description

Allows reading, setting, and clearing data retention policies on organizations and workspaces.

Testing plan

Run tests and make a test build of TFE provider that uses this branch.

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

$ TFE_ADDRESS="https://example" TFE_TOKEN="example" ENABLE_TFE=1 go test ./... -v -run _DataRetentionPolicy

=== RUN   TestOrganization_DataRetentionPolicy
=== RUN   TestOrganization_DataRetentionPolicy/set_data_retention_policy
=== RUN   TestOrganization_DataRetentionPolicy/update_data_retention_policy
=== RUN   TestOrganization_DataRetentionPolicy/delete_data_retention_policy
--- PASS: TestOrganization_DataRetentionPolicy (6.16s)
    --- PASS: TestOrganization_DataRetentionPolicy/set_data_retention_policy (1.52s)
    --- PASS: TestOrganization_DataRetentionPolicy/update_data_retention_policy (0.73s)
    --- PASS: TestOrganization_DataRetentionPolicy/delete_data_retention_policy (0.69s)
=== RUN   TestWorkspace_DataRetentionPolicy
=== RUN   TestWorkspace_DataRetentionPolicy/set_data_retention_policy
=== RUN   TestWorkspace_DataRetentionPolicy/update_data_retention_policy
=== RUN   TestWorkspace_DataRetentionPolicy/delete_data_retention_policy
--- PASS: TestWorkspace_DataRetentionPolicy (5.82s)
    --- PASS: TestWorkspace_DataRetentionPolicy/set_data_retention_policy (1.02s)
    --- PASS: TestWorkspace_DataRetentionPolicy/update_data_retention_policy (0.72s)
    --- PASS: TestWorkspace_DataRetentionPolicy/delete_data_retention_policy (0.69s)
PASS
ok      github.com/hashicorp/go-tfe     12.285s

@mwudka mwudka requested a review from a team as a code owner November 14, 2023 01:29
Copy link
Contributor

@Uk1288 Uk1288 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, looks good to me!

Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this interface 👍

@mwudka mwudka merged commit 481bfa8 into main Nov 29, 2023
@mwudka mwudka deleted the mwudka/TF-8621-data-retention-policy-management-endpoints branch November 29, 2023 18:44
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants